package com.joysuch.wwyt.bp.entity.inspect;


import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 *  巡检点： 巡检点项目
 */
@Data
@Entity
@EntityListeners({AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Table(name = "WWYT_BP_INSPECT_ITEM")
@SQLDelete(sql = "update WWYT_BP_INSPECT_ITEM set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql = "update WWYT_BP_INSPECT_ITEM set DELETE_FLAG = '1' where id= ?")
@Where(clause = "DELETE_FLAG = '0'")
public class BPInspectItem implements Serializable {

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("检查项序号")
    private int seqNo;

    @ApiModelProperty("检查项内容")
    private String inspectItem;

    @ApiModelProperty("检查项类型")
    private Long inspectType;

    @ApiModelProperty("检查标准")
    private String inspectStandard;


    //通用字段
    @org.springframework.data.annotation.CreatedBy
    @ApiModelProperty("创建人")
    private Long createBy;

    @org.springframework.data.annotation.CreatedDate
    @ApiModelProperty("创建时间")
    private Date createTime;

    @org.springframework.data.annotation.LastModifiedBy
    @ApiModelProperty("更新人")
    private Long updateBy;

    @org.springframework.data.annotation.LastModifiedDate
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("租户")
    private Long tenentId;

    @ApiModelProperty("组织机构代码")
    private String orgCode;

    @ApiModelProperty("删除标记")
    private String deleteFlag;


}
